@import tool.ReportPojo.ReportData
@import views.user.report.IndexTool._
@(resultPath: String, index: String)(implicit data: ReportData)

<div id="page">
	<br />
	<h2 class="titleLevel1" id="summary" style="page-break-before: always;"><span>@(index)
		、Results Summary by Treat</span></h2>

	<h3 id="sigMet" class="myMain titleLevel2"><span id="差异代谢物汇总">1　Differential Metabolites</span></h3>

	@if(data.summaryData.hasSigMet) {
		@user.reportEn.diffCs(resultPath)

		<table class="tf1 myTable" data-pagination="true" data-page-list="[10, 25, 50, 100, all]" data-search="true">
			<thead>
			@for(header <- data.summaryData.sigMetTable.headers) {
				<th>@header</th>
			}
			</thead>
			<tbody>
			@for(row <- data.summaryData.sigMetTable.rows) {
				<tr>
				@for(col <- row) {
					<td>@col</td>
				}
				</tr>
			}
			</tbody>

		</table>
	} else {
		@user.report.html.noResult()
	}

</div>

@if(data.configDatas(0).isSelfCor) {
	<div id="page" class="newPage">
		<h3 class="titleLevel2" id="显著自相关代谢物汇总">
			<span id="selfCor" class="myMain">
				@getCsSelfCorIndex(0) Statistically Significantly Pairs in Intra Correlation Analysis
			</span>
		</h3>

		@if(data.summaryData.hasSelfCor) {
			<p class="paragraph">
				Statistically significant pairs obtained from intra correlation analysis of all treats are shown in
				<a href="@(resultPath)/Treatment/Correlation_Summary/Intra_Correlation_Venn_Data.csv">
					Intra_Correlation_Venn_Data.csv</a>
				<a href="@(resultPath)/Treatment/Correlation_Summary" target="_blank"><span class="fa fa-folder-open"></span></a>
				<br>
				Venn diagram( or “flower plot”) which summarized statistically significant pairs in intra correlation analysis in all treats is shown in the following plot:
			</p>
			<p class="name_table">Summary of Statistically Significant Pairs in Intra Correlation</p>
			<div align="center">
				<a id="example2" data-fancybox="gallery" href="@(resultPath)/Treatment/Correlation_Summary/Intra_Correlation_Venn_Plot.png">
					<img class="wid2" src="@(resultPath)/Treatment/Correlation_Summary/Intra_Correlation_Venn_Plot.png">
				</a>
			</div>
		} else {
			@user.report.html.noResult()
		}

	</div>
}

@if(data.configDatas(0).isCor) {
	<div id="page" class="newPage">
		<h3 id="显著相关性对子汇总" class="titleLevel2">
			<span id="uploadCor" class="myMain">
				@getCsUploadCorIndex(0) Statistically Significantly Pairs in Inter Correlation Analysis
			</span>
		</h3>
		@user.reportEn.csDescribe(resultPath)

		@for(j <- data.summaryData.uploads.indices) {
			@if(j > 0) {
				<div class="newPage"></div>
			}
			<h4 class="titleLevel3">
					3.@(j + 1) Correlation with @(data.summaryData.uploads(j).dirName) for partial
			</h4>
			@if(data.summaryData.uploads(j).exist) {
				<p class="paragraph">
					Statistically significant pairs obtained from inter correlation analysis of all treats are shown in
					<a href="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/Inter_Correlation_Venn_Data.csv">
						Inter_Correlation_Venn_Data.csv</a>
					<a href="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/" target="_blank"><span class="fa fa-folder-open"></span></a>
					<br>
						Venn diagram( or “flower plot”) which summarized statistically significant pairs in inter correlation analysis in all treats is shown in the following plot:
				</p>
				<p class="name_table">Summary of Statistically Significant Pairs in Inter Correlation</p>
				<div align="center">
					<a id="example2" data-fancybox="gallery" href="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/Inter_Correlation_Venn_Plot.png">
						<img class="wid2" src="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/Inter_Correlation_Venn_Plot.png">
					</a>
				</div>
			} else {
				@user.report.html.noResult()
			}
		}
	</div>
}

@if(data.configDatas(0).isParCor) {
	<div id="page" class="newPage">
		<h3 id="显著偏相关对子汇总" class="titleLevel2">
			<span id="parCor" class="myMain">
				@getCsParCorIndex(0) Statistically Significantly Pairs in Partial Correlation Analysis
			</span>
		</h3>
		@user.reportEn.csDescribe(resultPath)

		@for(j <- data.summaryData.uploads.indices) {
			@if(j > 0) {
				<div class="newPage"></div>
			}
			<h4 class="titleLevel3">
				4.@(j + 1)  Partial Correlation with @(data.summaryData.uploads(j).dirName) for partial
			</h4>
			@if(data.summaryData.uploads(j).parExist) {
				<p class="paragraph">
					Statistically significant pairs obtained from partial correlation analysis of all treats are shown in
					<a href="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/Inter_Partial_Correlation_Venn_Data.csv">
						Inter_Partial_Correlation_Venn_Data.csv</a>
					<a href="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/" target="_blank"><span class="fa fa-folder-open"></span></a>
					<br>
						Venn diagram( or “flower plot”) which summarized statistically significant pairs in partial correlation analysis in all treats is shown in the following plot:
				</p>
				<p class="name_table">Summary of Statisti cally Significant Pairs in Partial Correlation</p>
				<div align="center">
					<a id="example2" data-fancybox="gallery" href="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/Inter_Partial_Correlation_Venn_Plot.png">
						<img class="wid2" src="@(resultPath)/Treatment/Correlation_Summary/@(data.summaryData.uploads(j).dirName)/Inter_Partial_Correlation_Venn_Plot.png">
					</a>
				</div>
			} else {
				@user.report.html.noResult()
			}
		}

	</div>
}






